#pragma once

struct GVertex
{
	float x;
	float y;
	float z;
};

struct GRECT
{	
	GRECT();
	GRECT(int l, int b, int r, int t);
	bool PointInRect(int x, int y);
	GRECT& Offset(int x, int y);
	GRECT& Offset(int nValue);
	GRECT& AdjustSize(int nValue);
	int width();
	int height();
	int left, botton, right, top;
};

struct GRGB
{
	GLubyte r;
	GLubyte g;
	GLubyte b;
	GRGB(){}
	GRGB(GLubyte red, GLubyte green, GLubyte blue)
	{
		r = red; g = green; b = blue;
	}
};

class GFont
{
public:
	enum HALIGN
	{
		LEFT, HMIDDLE, RIGHT
	};
	enum VALIGN
	{		
		TOP,VMIDDLE,BUTTON		
	};
public:
	static	GFont& Inst();	
	static	void	SelectFont(int size, int charset, const wchar_t* face);
	void	DrawText(const wchar_t* szText,GRGB rgb, GRECT rc, HALIGN h = HMIDDLE, VALIGN v = VMIDDLE);
	void	DrawLine(const wchar_t* szText,GRGB rgb, int x, int y);
	void	TextLine(const wchar_t* szText,GRGB rgb, GRECT rc, HALIGN h = HMIDDLE, VALIGN v = VMIDDLE);
	HDC		GetDC();
	static	void	SetDC(HDC hDC);
	static	HDC		m_hDC;
};